HTTXPlugin

HTML to text conversion plugin
by AmiTrix Development and Gabriele Favrin



THE AUTHORS ARE IN NO WAY RESPONSIBLE FOR ANY DAMAGE THAT THESE PROGRAMS MAY CAUSE.

These files are included in HTTX distribution with explicit AmiTrix permission. Redistribution or modification are forbidden. If you improve these scripts just send me the new version.



With HTTXPlugin you can use HTTX from AWeb to save (or print) HTML pages as text. This version of the interface requires AWeb II 3.0 or better and HTTX 1.5 or better. Also, the command "Delete" must be present in C: directory.



How to install



How to config

First you have to setup configuration.
Load HTTXPluginCFG.awebrx and set the various options:

HTML conversion related configuration

Default Directory
Default directory to save converted files

Line length
Maximum length for each line.

Equals to option LEN

Indentation
Number of spaces for indentation (re-enter to the right) of the <UL> and <DL> lists.

Equals to option INDENT

ANSI conversion of styles and links
ANSI conversion of HTML styles and LINKS.

Equals to option ANSI

Conversion of entities to 7 bit ascii
Conversion of HTML entities (accent letters, and so) to ASCII codes lower than 128.

Equals to option 7BIT

HR draw mode
Set type of lines drawed when encountering <HR> tag.

Offno lines
ASCIIlines composed by "-"
ANSIlines composed by underlined spaces
Equals to option HRMODE=nn

Ignore text and HR alignment
Don't centre/align right text and lines.

Equals to option NOALIGN

Save title as FileNote
Saves the document title (<TITLE>) as output file comment.
Only used when saving as text.

Equals to option FILENOTE

Suppress Title/URL
Suppresses insertion of document Title (<TITLE>) and URL in converted file.

Equals to option NOHEADER if set, GETNOTE if not set.

Print HTML Link References
Adds HTML link references to converted file.

Equals to option HREF

Print Image Alternate Texts
Adds the ALT-text of images (<IMG>) to converted file.

Equals to option IMG

Support badly written HTML
Partial support for badly written HTML documents. Use with caution!

Equals to option BADHTML

These settings will be saved in the environment vars HTTX.prefs (for Save as text) and HTTXprt.prefs (for Print as text).

Other options (like FORCE) are managed directly from the Plugin.
Refer to HTTX documentation for full explanation of options.

Plugin related configuration

Print HTTP/META header
Adds the header informations received by AWeb from server when getting the document and the meta tags present in the HTML source to converted file.

Example of the added text:

Header:
HTTP/1.0 200 OK
Server: Netscape-Enterprise/2.01
Date: Sat, 26 Apr 1997 06:38:12 GMT
Accept-ranges: bytes
Last-modified: Tue, 15 Apr 1997 13:57:46 GMT
Content-length: 7085
Content-type: text/html
Content-Type: text/html; charset=ISO-8859-1
Show preview of converted document
With this option after converting a document it will be showed (using Multiview that must be in "SYS:Utilities/" drawer). After closing Multiview a requester will ask if the document should be kept or deleted. Selecting Delete the file will be erased and no conversion informations will be showed.

This option is only used when saving as text.

Show conversion informations
After converting a document, an info page containing current settings of HTTX is normally showen. You can set within this and just a requester that reports if conversion has been succesful.

These settings will be saved in the environment variable HTTXPlugin.config.


HTTXPlugin works as the standard preference programs, so you can use Save or Use option to store data. With "Save" the settings are stored in ENVARC: and then keeped for other sessions. With "Use" only in ENV: so they are lost when resetting computer. Obviously first time you have to use "Save" option.



How to use

For saving or printing a page just use the previously set menu or popup entries).

If page contains frames a requester will be popup. You can choose to save all frames to a single file or to select which ones. In this case all frames will be shown and a requester will ask to save or skip it.

When saving, after conversion of any document, if preview is active, document will be shown and then with a requester will be possible to keep or delete it.